const express = require("express");
const router = express.Router();
const UserController = require("../controllers/userController");

// 用户注册接口
router.post("/register", UserController.register);

// 通过 firstName 查询用户详情
router.get("/users/firstName/:firstName", UserController.getUserByFirstName);

// 更新用户信息
router.put("/users/:id", UserController.updateUser);

// 删除用户
router.delete("/users/:id", UserController.deleteUser);

module.exports = router;
